package com.day13_Internet;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;

/**
 * @ClassName: TCP_send_demo
 * @Author: zw
 * @Description: 出百万拳，行万里路；
 * @Create 2024/3/24-19:56
 * @Version 1.0
 */
public class TCP_send_demo {
    public static void main(String[] args) throws IOException {
        // 1. 创建客户端的Scoket对象
        Socket t = new Socket(InetAddress.getByName("192.168.3.7"), 4000);
        // 2. 获取输出流 写数据
        OutputStream os = t.getOutputStream();
        os.write("hello, tcp".getBytes());
        // 3.
        t.close();
    }
}
